class daocheng::lustre {
   case $facts['os']['release']['major'] {
    '6': {
           yumrepo {"lustre":
             baseurl   =>  "http://mirror.ihep.ac.cn/yum/lustre/public/lustre/lustre-2.10.6/el6/client/RPMS/x86_64",
             descr => "lustre client",
             enabled => 1,
             gpgcheck => 0,
             priority => 40,
             before   => Yumrepo['site']
           }->
           package { [
                      "lustre-client",
                      "lustre-client-debuginfo",
                      "lustre-iokit",
                      "lustre-client-tests",
                      "kmod-lustre-client",
                      ]:
             ensure            => installed,
             require           => Yumrepo['site']
           }
     }

    '7': {
        yumrepo {"lustre":
          baseurl   =>  "http://mirror.ihep.ac.cn/yum/lustre/$operatingsystemrelease/client",
          descr => "lustre client",
          enabled => 1,
          gpgcheck => 0,
          priority => 40,
          before   => Yumrepo['site']
        }
        package { ["lustre-iokit",
                   "lustre-client",
                   "lustre-client-debuginfo",
                   "lustre-client-tests",
                   "kmod-lustre-client",
                   "kmod-lustre-client-tests"]:
                 ensure => 'installed',
                 require => Yumrepo['site'],
       }
    }
     /8|9/: {
        $lustrerepo = "${facts['os']['release']['full']}"
        yumrepo {"lustre":
          baseurl   =>  "http://${mirrorserver}/yum/lustre/${lustrerepo}/client/",
          descr => "lustre client",
          enabled => 1,
          gpgcheck => 0,
          priority => 20,
          before   => Yumrepo['site']
        }
        yumrepo {"e2fs":
          baseurl   =>  "http://${mirrorserver}/yum/lustre/public/e2fsprogs/1.47.0.wc6/el${facts['os']['release']['major']}/",
          descr => "e2fs",
          enabled => 1,
          gpgcheck => 0,
          priority => 20,
          before   => Yumrepo['site']
        }
        package { ["lustre-iokit",
                   "lustre-client",
                   "lustre-client-dkms",
                   "lustre-client-debuginfo",
                   "kmod-lustre-client"]:
                 ensure => 'installed',
                 require => Yumrepo['site'],
       }
       package { [ "lustre-client-tests",
                   "kmod-lustre-client-tests"]:
                 ensure => 'absent',
                 require => Yumrepo['site'],
       }

    }

  } ->
  package { 'lustre-config':
       provider => 'rpm',
       ensure => 'installed',
       source => "http://202.122.33.67/yum/lustre/lustre-config-3.0-6.lhmt.x86_64.rpm",
  }
 
}
